package mysgs.test;

import org.openslash.resource.StandardResourcePacket;
import org.openslash.util.DBAccessor;
import org.openslash.util.Scanner;
import org.openslash.util.StandardDBAccessor;
import org.openslash.util.debug;

import mysgs.SGSMatchConfiguration;
import mysgs.SGSRuleEngine;
import mysgs.cards.SGSCardInstance;

public class Main {
	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		Scanner.setUp(new SEScannerInputMethord());
		debug.setUp(new sedebug());
		
		StandardDBAccessor.setUp("res/mysgs.db", "/res/sql_event.properties");
		SGSCardInstance cardInstance = 
			new SGSCardInstance(
				new StandardResourcePacket("/res/cardtext_zh_cn.properties")
		);
		
		SGSMatchConfiguration cfg = new SGSMatchConfiguration();
/*		
		List<String> plist = new ArrayList<String>(6);
		plist.add("RedL");
		plist.add("RedM");
		plist.add("RedR");
		plist.add("BlueL");
		plist.add("BlueM");
		plist.add("BlueR");
/*
		SGSMatchConfiguration cfg = new SGSMatchConfiguration(
			SGSMatchConfiguration.MATCHMODE_S1V1,
			SGSMatchConfiguration.PACKAGESN_STANDARD |
			SGSMatchConfiguration.PACKAGESN_EX |
			SGSMatchConfiguration.PACKAGESN_EX2 |
			SGSMatchConfiguration.PACKAGESN_WIND |
			SGSMatchConfiguration.PACKAGESN_FIRE |
			SGSMatchConfiguration.PACKAGESN_FOREST |
			SGSMatchConfiguration.PACKAGESN_SPVERSION |
			SGSMatchConfiguration.PACKAGESN_GODCARD
			, false, plist);
*/
/*		
		SGSMatchConfiguration cfg = new SGSMatchConfiguration(
			SGSMatchConfiguration.MATCHMODE_S3V3,
			SGSMatchConfiguration.PACKAGESN_S3V3, false, plist
		);
*/	
		SGSRuleEngine engine = new SGSRuleEngine(cfg, cardInstance);
		engine.debugMode = false;
		engine.run();
//exit process
		DBAccessor.destroy();
		debug.destroy();
	}
}
